#ifndef tlmRmtCfgSrvApp_H
#define tlmRmtCfgSrvApp_H

//## attribute mParaAdmin
#include "tlmRmtCfgParaAdmin.h"
//## attribute mParaNavi
#include "tlmRmtCfgParaNavi.h"
//## attribute mParaWeb
#include "tlmRmtCfgParaWeb.h"
//## class tlmRmtCfgSrvApp
#include "tlmServiceApp.h"
#include "ActiveClass.h"

//## operation OnReceiveMsg(tlmServiceMsg)
class tlmServiceMsg;


//## class tlmRmtCfgSrvApp
class tlmRmtCfgSrvApp : public tlmServiceApp, public ActiveClass{
    ////    Friends    ////
public:
    #define TLM_ACK_STATUS_OK 0
    #define TLM_ACK_STATUS_KO 1
    #define TLM_ACK_STATUS_OUTSIDE_LIMITS 2   
    
public :


    ////    Constructors and destructors    ////
    
    tlmRmtCfgSrvApp();
    
    virtual ~tlmRmtCfgSrvApp();
	
	void initialize();
    
    ////    Operations    ////
    
    //## operation GetAckStatus()
    uint8_t GetAckStatus();
    
    //## operation GetInstance()
    static tlmRmtCfgSrvApp* GetInstance();

    void destroyInstance();
    
    //## operation GetParaAdmin()
    virtual tlmRmtCfgParaAdmin* GetParaAdmin();
    
    //## operation GetParaNavi()
    virtual tlmRmtCfgParaNavi* GetParaNavi();
    
    //## operation GetParaWeb()
    virtual tlmRmtCfgParaWeb* GetParaWeb();
    
    //## operation OnReceiveMsg(tlmServiceMsg)
    virtual void OnReceiveMsg(tlmServiceMsg* srvMsg);
    
    //## operation SaveParameters()
    uint8_t SaveParameters();
    
    //## operation SendMsg(tlmServiceMsg) const
    void SendMsg(tlmServiceMsg* msg) ;
    
    //## operation __OnReceiveMsg(tlmServiceMsg)
    void __OnReceiveMsg(tlmServiceMsg* srvMsg);
    
    //## operation __OnReceivePendingMsg(tlmServiceMsg) const
    void __OnReceivePendingMsg(tlmServiceMsg* srvMsg) ;
    
    //## operation __OnReceiveReqParaMsg(tlmServiceMsg)
    void __OnReceiveReqParaMsg(tlmServiceMsg* srvMsg);
    
    //## operation __OnReceiveSetParaMsg(tlmServiceMsg)
    void __OnReceiveSetParaMsg(tlmServiceMsg* srvMsg);
	
    void SendHttpMsg(uint8_t* msgPayload, uint32_t length); 
protected :
     /// operation __SyncCall(RPC_IOCTL_PTR)
     virtual void __SyncCall(RPC_IOCTL_PTR p);
 
     /// operation __AsyncCall(RPC_IOCTL_PTR)
     virtual void __AsyncCall(RPC_IOCTL_PTR p);    
	 
protected :

    uint8_t mAckStatus;		//## attribute mAckStatus
    
    tlmRmtCfgParaAdmin mParaAdmin;		//## attribute mParaAdmin
    
    tlmRmtCfgParaNavi mParaNavi;		//## attribute mParaNavi
    
    tlmRmtCfgParaWeb mParaWeb;		//## attribute mParaWeb
    
    static tlmRmtCfgSrvApp* mpInstance;		//## attribute mpInstance
};
#endif
